package com.huaxiafinance.management.dto.response;

import com.huaxiafinance.management.util.DateUtil;

import java.util.Date;

public class QueryFrontUserDto {
	private Integer id;

	private String userUuid;

	private String userName;

	private String identityTag;

	private String maritalStatus;

	private String realName;

	private String commonCellphone;

	private Integer provinceId;

	private Integer cityId;

	private String commonAddress;

	private Date createdAt;

	private String message;

	private Date authTime;

	private String macCode;

	private String pullTime;
	
	private Integer isBlack;
	
	public Integer getIsBlack() {
		return isBlack;
	}

	public void setIsBlack(Integer isBlack) {
		this.isBlack = isBlack;
	}

	public String getPullTime() {
		if (this.pullTime != null) {
			try {
				Date pull = DateUtil.stringToDate("yyyy-MM-dd HH:mm:ss", this.pullTime);
				if ((new Date().getTime() - pull.getTime()) / (3600 * 1000 * 24) < 30) {
					return "是";
				} else {
					return "过期";
				}
			} catch (Exception e) {
				e.printStackTrace();
			}
		}
		return "否";
	}

	public void setPullTime(String pullTime) {
		this.pullTime = pullTime;
	}

	public String getMacCode() {
		return macCode;
	}

	public void setMacCode(String macCode) {
		this.macCode = macCode;
	}

	public Long getAuthTime() {
		if (this.authTime != null) {
			if ((new Date().getTime() - this.authTime.getTime()) / (3600 * 1000 * 24) < 30) {
				return authTime.getTime();
			}
		}
		return null;
	}

	public void setAuthTime(Date authTime) {
		this.authTime = authTime;
	}

	public String getMessage() {
		if (this.authTime != null) {
			if ((new Date().getTime() - this.authTime.getTime()) / (3600 * 1000 * 24) < 30) {
				return message;
			}
		}
		return null;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public Integer getProvinceId() {
		return provinceId;
	}

	public void setProvinceId(Integer provinceId) {
		this.provinceId = provinceId;
	}

	public Integer getCityId() {
		return cityId;
	}

	public void setCityId(Integer cityId) {
		this.cityId = cityId;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getUserUuid() {
		return userUuid;
	}

	public void setUserUuid(String userUuid) {
		this.userUuid = userUuid;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getIdentityTag() {
		return identityTag;
	}

	public void setIdentityTag(String identityTag) {
		this.identityTag = identityTag;
	}

	public String getMaritalStatus() {
		return maritalStatus;
	}

	public void setMaritalStatus(String maritalStatus) {
		this.maritalStatus = maritalStatus;
	}

	public String getRealName() {
		return realName;
	}

	public void setRealName(String realName) {
		this.realName = realName;
	}

	public String getCommonCellphone() {
		return commonCellphone;
	}

	public void setCommonCellphone(String commonCellphone) {
		this.commonCellphone = commonCellphone;
	}

	public String getCommonAddress() {
		return commonAddress;
	}

	public void setCommonAddress(String commonAddress) {
		this.commonAddress = commonAddress;
	}

	public Date getCreatedAt() {
		return createdAt;
	}

	public void setCreatedAt(Date createdAt) {
		this.createdAt = createdAt;
	}
}